﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GFE.SharePoint.BaseClasses
{
    public abstract class GFEBaseDecorator<T>
    {
        private T _service;
        protected T Service
        {
            get
            {
                if (Equals(_service, default(T)))
                {
                    _service = GFECompositionContainer.GetExport<T>().Value;
                }
                return _service;
            }

            private set
            {
                _service = value;
            }
        }

        protected GFEBaseDecorator(T Service)
        {
            this.Service = Service;
        }
        protected GFEBaseDecorator() { }

    }
}
